package com.company.thread;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @description: some desc
 * @author: ruoan
 * @date: 2020/12/8 14:37
 */


public class CASDemo {
    public static void main(String[] args) {

        AtomicInteger atomicInteger = new AtomicInteger(1);


        atomicInteger.getAndIncrement();  // 不同于i++不保证原子性,如何通过这一句保证原子性的？因为 sun.misc.Unsafe
    }
}
